All Questions
Tagged with object-orientedperformance
144 questions
10votes
3answers
1kviews
Computing π(x): the combinatorial method
This is my C++ implementation of Computing π(x): the combinatorial method by Tomás Oliveira e Silva. The math involved is elementary number theory, but fiddly and not the focus here. I have ...
3votes
1answer
91views
Merge discrete integer intervals
What it does The code starts with a set of integer intervals, and can add new intervals (possibly by updating existing intervals). Essentially, it is a bit array whose index starts at ...
1vote
1answer
284views
Rules-engine to be improved/simplified for Efficiency (performance), Extensibility and Maintenance?
This is a simple implementation of a rules engine. I am really hating the very long MATCH/CASE function. I am wondering what kind of Design Patterns could be used there to make this code more ...
3votes
2answers
185views
BlackJack in python
I began creating blackjack in python; however, I'm looking to simulate it, so I'm thinking I'm going to need to optimize it so that I don't just leave my computer running for three hours waiting for ...
3votes
2answers
251views
Tic-tac-toe OOP Minimax Algorithm
I wrote a module that I intend to use in my next tic-tac-toe project. All it is is a class that stores the boardstate along with some methods/properties. The biggest thing is the minimax alg. As shown ...
4votes
1answer
69views
Terminal Graphical Visualizer, using a queue of different matrices
I built a project in which I provide a string input or a whole matrix to configure a frame, create a bunch of different frames and push them into a queue and finally print them in order of the queue. ...
4votes
0answers
413views
A vehicle database in Excel
I'm looking for some help. I'm new to coding and have started creating this Vehicle database program in Excel for a friend to use. He is wanting to be able to see all vehicles he owns, when ...
0votes
1answer
253views
Python Logic Gate Circuit Simulator [closed]
I have recently become interested in simulating logic circuits because of a electronics class at school. I have created a functioning simulator for logic gate circuits in Python. My implementation ...
4votes
1answer
496views
Yet another sparse set implementation
I got inspired by this blog post and implemented a fixed-size sparse set, removing the need for vectors, because the sparse set's size equals at least ...
5votes
1answer
1kviews
Matchsticks game in Python
I made the following game in Python applying object oriented programming and I would like to know if there is something to improve. PS: My native language is Spanish, if you see something wrong ...
4votes
1answer
636views
Code to scan filesystem, store every path into sqlite and update only when something has changed
I have made a program that does what the title explains. It also hashes the file to check for changes. I will be doing this for a project to keep track of files that has been changed when doing ...
2votes
1answer
178views
Prevent Column Name Collision
I have been working on a series of posts about a library to connect to databases but most of the scenarios I have to resort to some "JOIN" the problem arose when two or more tables had some ...
1vote
1answer
208views
Rock paper scissors coding assignment
I had a coding assignment to write a Rock Paper Scissors game. The main task is not to show a solution but rather to test the coding style. The rules are such: Problem: rock is "O", paper is ...
2votes
2answers
125views
Complex Filter in one Opration
I am working on a Data-based application. I wrote a code to filter the table. The table has String and Numbers. I some filter ...
-1votes
2answers
88views
Simple Vehicle speed representation [closed]
This code models two vehicle types, with a method to accept a string representing a boost to change speed. How can I optimize performance in inheritance child class? How can I reduce the code inside ...